<?php
// include function files for this application
require_once('/home/domains/uny-con.com/public_html/uny-con_fns.php');
if (!session_id()) { session_start(); }

//get some variables
$attendee_id = $_SESSION['current_attendee_id'];

if (isset($_GET['status'])) { $status = $_GET['status'] ; }


$approve_co_gm = $_POST['approve_co_gm'];
$remove_co_gm = $_POST['remove_co_gm'];


do_html_header('UNY-Con GM Management', gobig, $uny);
if (!check_valid_user()) {
	echo 'You are not logged in, please login with the registration tab above';
	print_brs(6);
	do_html_footer(news);
	exit;
	}
if (isset($approve_co_gm)) {
	foreach($approve_co_gm as $cogmstring) {
		list($cogm_attendee_id,$timeslot,$event_id) = explode(".", $cogmstring);
		approve_co_gm($cogm_attendee_id, $event_id, $timeslot);
		}
	}

if (isset($remove_co_gm)) {
	foreach($remove_co_gm as $cogmstring) {
		list($cogm_attendee_id,$timeslot,$event_id) = explode(".", $cogmstring);
		deny_gm($cogm_attendee_id, $event_id, $timeslot);
		}
	}


	print_cogm_search_form($status);
	display_event_cogm(get_event_cogms($_SESSION['current_attendee_id'], $status), all);

do_html_footer(no_news);